
#include "gtest/gtest.h"

#include "Queue.h"

TEST( QueueTest, Simple )
{
    Queue<int> Q(3);
    int x;

    // [ 1, 2, 3 ]
    EXPECT_THROW( Q.Add( 1 ).Add( 2 ).Add( 3 ).Add( 4 ), class NoMem );

    EXPECT_EQ( 1, Q.First() );
    EXPECT_EQ( 3, Q.Last() );

    Q.Delete( x );
    Q.Delete( x );
    Q.Delete( x );

    EXPECT_THROW( Q.Delete( x ), class OutOfBounds );
}

#include "main_stub.h"

